package com.myz.app.factory;

import java.util.LinkedHashMap;

/**
 * Created by maoyz on 17-10-11.
 */
public class FilterChainDefinitionMapBuilder {

    /**
     * 作为资源和权限处理
     * 1 类型返回LinkedHashMap
     * 2 map中存放的值注意前后顺序
     */
    public LinkedHashMap<String , String> buildFilterChainDefinitionMap(){
        LinkedHashMap<String ,String> map = new LinkedHashMap<>();
        map.put("/login","anon");
        map.put("/success.jsp","anon");
        map.put("/logout","logout");
        map.put("/admin.jsp","roles[admin]");
        map.put("/user.jsp","roles[user]");
        map.put("/**","authc");
        return map;
    }
}
